package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 角色实体类
 */
@Data
@NoArgsConstructor
@TableName("t_role")
public class RoleBean {
    @TableId(value = "pk_roleId",type = IdType.AUTO)
    private Integer id;
    /**
     * 角色名字
     */
    @TableField("r_name")
    private String name;
    /**
     * 权限集合
     */
    @TableField(exist = false)
    private List<PermissionBean> permissionList;


    @Override
    public String toString() {
        return "RoleBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", permissionList=" + permissionList +
                '}'+"\n";
    }
}
